A container for the routine containing the ODEs to integrate.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
procedure(ode), | public, | pointer, nopass | :: | fcn | => | null() |
A pointer to the routine containing the ODEs to integrate. |
procedure(ode_jacobian), | public, | pointer, nopass | :: | jacobian | => | null() |
A pointer to the routine containing the analytical Jacobian. If supplied, this routine is utilized; however, if null, a finite difference approximation is utilized. |
procedure(ode_mass_matrix), | public, | pointer, nopass | :: | mass_matrix | => | null() |
A pointer to the routine containing the mass matrix for the system. If set to null (the default), an identity mass matrix will be assumed. |
Computes the Jacobian matrix for the system of ODEs. If a routine is provided with an analytical Jacobian, the supplied routine is utilized; else, the Jacobian is estimated via a forward difference approximation.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ode_container), | intent(inout) | :: | this |
The ode_container object. |
||
real(kind=real64), | intent(in) | :: | x |
The current independent variable value. |
||
real(kind=real64), | intent(in), | dimension(:) | :: | y |
An N-element array containing the current dependent variable values. |
|
real(kind=real64), | intent(out), | dimension(:,:) | :: | jac |
An N-by-N matrix where the Jacobian will be written. |
|
class(errors), | intent(inout), | optional, | target | :: | err |
An optional errors-based object that if provided can be used to retrieve information relating to any errors encountered during execution. If not provided, a default implementation of the errors class is used internally to provide error handling. Possible errors and warning messages that may be encountered are as follows.
|
Gets the size of the step to use for the finite difference calculations used to estimate the Jacobian.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ode_container), | intent(in) | :: | this |
The ode_container object. |
The step size.
Gets a value determining if the mass matrix is state-dependent such that it requires updating at every integration step.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ode_container), | intent(in) | :: | this |
The ode_container object. |
True if the mass matrix is state-dependent such that it requires updating at each integration step; else, false if the mass matrix is not state-dependent and can be treated as constant for all integration steps.
Gets a logical value determining if the ODE routine has been defined.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ode_container), | intent(in) | :: | this |
The ode_container object. |
True if the ODE routine has been defined; else, false.
Sets the size of the step to use for the finite difference calculations used to estimate the Jacobian.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ode_container), | intent(inout) | :: | this |
The ode_container object. |
||
real(kind=real64), | intent(in) | :: | x |
The step size. |
Sets a value determining if the mass matrix is state-dependent such that it requires updating at every integration step.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ode_container), | intent(inout) | :: | this |
The ode_container object. |
||
logical | :: | x |
True if the mass matrix is state-dependent such that it requires updating at each integration step; else, false if the mass matrix is not state-dependent and can be treated as constant for all integration steps. |